package com.ccrfid.rmc6.repository.business.prison.door;

import com.ccrfid.rmc6.entity.business.prison.door.InOutRecordEntity;
import com.ccrfid.rmc6.repository.search.SearchableRepository;
import org.springframework.data.repository.Repository;

import java.util.List;

public interface InOutRecordRepository extends Repository<InOutRecordEntity, Long>,
        SearchableRepository<InOutRecordEntity> {

    InOutRecordEntity getById(Long id);

    List<InOutRecordEntity> getAllByDoorId(Long doorId);

    boolean existsById(Long id);

    boolean existsByDoorId(Long doorId);

    InOutRecordEntity save(InOutRecordEntity entity);

    void deleteAllByDoorId(Long doorId);

}
